package io;

import java.io.*;

//带有自动行数新的字符输出流
public class PwDemo {
    public static void main(String[] args) throws FileNotFoundException {
        /*PrintWriter pw = new PrintWriter("pw.txt");
        pw.println("w1waa");
        pw.println("sssssssssssjjjhhh");
        System.out.println("写出完毕");
        pw.close();
、

         */

        //文件流：低级流/节点流，作用：链接程序和文件的
        FileOutputStream fos = new FileOutputStream("pw2.txt");
        //
        OutputStreamWriter osw = new OutputStreamWriter(fos);
        //
        BufferedWriter bw = new BufferedWriter(osw);
        //
        PrintWriter pw  =new PrintWriter(bw);
        pw.println("w1waa");
        pw.println("sssssssssssjjjhhh");
        System.out.println("写出完毕");
        pw.close();

    }
}
